﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QLNhaThuoc.DAL;
using QLNhaThuoc.DTO;

namespace QLNhaThuoc.BL
{
    class LoaiThuocControl
    {
        LoaiThuocDA loaiThuocDA = new LoaiThuocDA();

        public LoaiThuoc[] LayListLoaiThuoc()
        {
            return loaiThuocDA.LayListLoaiThuoc();
        }

        public void ThemLoai(LoaiThuoc info)
        {
            loaiThuocDA.insert(info);
        }

        public void XoaLoai(LoaiThuoc info)
        {
            loaiThuocDA.delete(info);
        }

        public void CapNhatLoai(LoaiThuoc info)
        {
            loaiThuocDA.update(info);
        }

        //public void CapNhatLoai(LoaiThuoc old_info, LoaiThuoc info)
        //{
        //    loaiThuocDA.update(old_info, info);
        //}

        public bool KiemTraPK(LoaiThuoc info)
        {
            return loaiThuocDA.KiemTraPK(info);
        }
    }
}
